<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //打印人的一生 从一岁到一百岁
        var i = 1;
        while (i <= 100) {
            console.log('这个人今年' + i + '岁了');
            i++;
        }
        //计算1~100之间所有整数的和
        var sum = 0;
        var j = 1;
        while (j <= 100) {
            sum += j;
        }
        console.log(sum);
    </script>
</head>

<body>

</body>

</html>